The Accordion Pane Component > FAccordionPane.replaceItemAt() |
FAccordionPane.replaceItemAt()
Availability
Flash Player 6.
Usage
myAccordion_acp.replaceItemAt (index,
label, linkage)
Parameters
index The index of the item which should be replace with the specified item.
label A string representing the label / title of the new section.
linkage A string specifying a movie clip linkage id, which should be displayed
in the new section.
Returns
Nothing
Description
Replaces the item at the specified index with a new item with the specified
label and linkage id.
Example
The accordion_example1.fla example file contains an example of using this method.
The following code adds four sections to the component and then replaces the item at the second index.
var sections = ["Section 1","Section 2","Section 3","Section 4"];
myAccordionPane_acp.setDataProvider(sections);
myAccordionPane_acp.replaceItemAt(2, "New Section");
var item = myAccordionPane_acp.getItemAt(2);
trace("Item Label: "+item.label); //traces "Item Label: New Section"
See also
FAccordionPane.setDataProvider()